// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_BPT_DRAW_BLUEPRINT
// * CreateDate    : 2011-8-25 17:07:23
// * Creater       : CodeSmith
// * LastChangeDate: 2011-8-25 17:07:23
// * LastChanger   : 2011-8-25 17:07:23
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class BptDrawBlueprintEntity : EntityBase
    {
        public BptDrawBlueprintTable TableSchema
        {
            get
            {
                return BptDrawBlueprintTable.Current;
            }
        }

        public BptDrawBlueprintEntity()
        {

        }

        public BptDrawBlueprintEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.DrawBlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["DRAW_BLUEPRINT_ID"]));
            this.ApplicationType = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_TYPE"]));
            this.TaskCode = Convert.ToString(CommonFunctions.ToObject(dr["TASK_CODE"]));
            this.DrawingPerson = Convert.ToString(CommonFunctions.ToObject(dr["DRAWING_PERSON"]));
            this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
            this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
            this.SheduledDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["SHEDULED_DATE"]));
            this.FinishedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FINISHED_DATE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.WorkingTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["WORKING_TIME"]));
        }

        public BptDrawBlueprintEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.DrawBlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["DRAW_BLUEPRINT_ID"]));
            this.ApplicationType = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_TYPE"]));
            this.TaskCode = Convert.ToString(CommonFunctions.ToObject(dr["TASK_CODE"]));
            this.DrawingPerson = Convert.ToString(CommonFunctions.ToObject(dr["DRAWING_PERSON"]));
            this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
            this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
            this.SheduledDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["SHEDULED_DATE"]));
            this.FinishedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FINISHED_DATE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.WorkingTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["WORKING_TIME"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BptDrawBlueprintTable.Current;
            }
        }

        #region Perporty List
        public string DrawBlueprintId
        {
            get { return Convert.ToString(GetData(BptDrawBlueprintTable.C_DRAW_BLUEPRINT_ID)); }
            set { SetData(BptDrawBlueprintTable.C_DRAW_BLUEPRINT_ID, value); }
        }

        public string ApplicationType
        {
            get { return Convert.ToString(GetData(BptDrawBlueprintTable.C_APPLICATION_TYPE)); }
            set { SetData(BptDrawBlueprintTable.C_APPLICATION_TYPE, value); }
        }

        public string TaskCode
        {
            get { return Convert.ToString(GetData(BptDrawBlueprintTable.C_TASK_CODE)); }
            set { SetData(BptDrawBlueprintTable.C_TASK_CODE, value); }
        }

        public string DrawingPerson
        {
            get { return Convert.ToString(GetData(BptDrawBlueprintTable.C_DRAWING_PERSON)); }
            set { SetData(BptDrawBlueprintTable.C_DRAWING_PERSON, value); }
        }

        public string ApplicationItemId
        {
            get { return Convert.ToString(GetData(BptDrawBlueprintTable.C_APPLICATION_ITEM_ID)); }
            set { SetData(BptDrawBlueprintTable.C_APPLICATION_ITEM_ID, value); }
        }

        public string BlueprintId
        {
            get { return Convert.ToString(GetData(BptDrawBlueprintTable.C_BLUEPRINT_ID)); }
            set { SetData(BptDrawBlueprintTable.C_BLUEPRINT_ID, value); }
        }

        public DateTime SheduledDate
        {
            get { return Convert.ToDateTime(GetData(BptDrawBlueprintTable.C_SHEDULED_DATE)); }
            set { SetData(BptDrawBlueprintTable.C_SHEDULED_DATE, value); }
        }

        public DateTime FinishedDate
        {
            get { return Convert.ToDateTime(GetData(BptDrawBlueprintTable.C_FINISHED_DATE)); }
            set { SetData(BptDrawBlueprintTable.C_FINISHED_DATE, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(BptDrawBlueprintTable.C_STATUS)); }
            set { SetData(BptDrawBlueprintTable.C_STATUS, value); }
        }

        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(BptDrawBlueprintTable.C_APPROVED_DATE)); }
            set { SetData(BptDrawBlueprintTable.C_APPROVED_DATE, value); }
        }

        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(BptDrawBlueprintTable.C_APPROVED_BY)); }
            set { SetData(BptDrawBlueprintTable.C_APPROVED_BY, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(BptDrawBlueprintTable.C_REMARK)); }
            set { SetData(BptDrawBlueprintTable.C_REMARK, value); }
        }

        public decimal WorkingTime
        {
            get { return Convert.ToDecimal(GetData(BptDrawBlueprintTable.C_WORKING_TIME)); }
            set { SetData(BptDrawBlueprintTable.C_WORKING_TIME, value); }
        }

        #endregion
    }


}

